<template>
    <div class="container">
        <div class="v-header">
            <div class="v-left-text">
            <!-- <i size="20" :class="icon" class="h-icon"/> -->
            <span>{{ title || text }}</span>
            </div>
            <div class="content">
            <slot name="content"></slot>
            </div>
            <div class="v-right-content">
            <slot></slot>
            </div>
        </div>
        <div class="form">
            <el-form :model="form" label-width="120px">
                <el-form-item label="Activity name">
                    <el-input v-model="form.name" />
                </el-form-item>
            </el-form>
        </div>
        <div class="main"></div>
        <div class="foot"></div>
    </div>
</template>
<script>
import extend from "@/extension/report/report/View_Spc.js";
export default {
    props: {
        icon: {
            type: String,
            default: ''
        },
        title: {
            type: String,
            default: 'SPC分析'
        },
        text: {
            type: String,
            default: '未定义名称'
        }
    },
    components: { },
    methods: {
        getForm() {
            this.$message.error(JSON.stringify(this.formFields));
        },
        reset() { },
    },
    mounted() { },
    data() {
        return {
            loadKey: true,
            formFields: {
                Variety: "日用品",
                DateRange: "2019-09-01",
                City: "北京市",
                AvgPrice: 1238000,
                Variety1: "",
                DateRange1: "2019-09-02",
                City1: "上海市",
                AvgPrice1: 7.72,
                DateRange2: "2019-09-03",
                City2: "广州市",
            },
            form: {
                name: '',
                region: '',
                date1: '',
                date2: '',
                delivery: false,
                type: [],
                resource: '',
                desc: '',
            },
            formRules: [
                [
                    {
                        title: "商品类型",
                        dataKey: "age",
                        // 如果这里绑定了data数据，后台不会加载此数据源
                        data: [],
                        field: "Variety",
                        type: "select",
                    },
                    {
                        dataKey: "city",
                        title: "所在城市",
                        field: "City",
                        type: "select",
                        data: [],
                    },
                    {
                        title: "成交均价",
                        field: "AvgPrice",
                    },
                    {
                        title: "详细地址",
                        field: "City2",
                    },
                ],
                [
                    {
                        dataKey: "city",
                        title: "所在地区",
                        field: "City1",
                        type: "select",
                        data: [],
                    },
                    {
                        title: "生产价格",
                        field: "AvgPrice1",
                    },
                    {
                        type: "date",
                        title: "生产日期",
                        field: "DateRange2",
                    },
                    {
                        title: "审核日期",
                        field: "DateRange",
                        type: "date",
                    },
                ],
            ],
        };
    },
};
</script>
<style scoped>
    .container{
        width:100%;
        padding: 10px;
    }
</style>
